package com.obst.story.application.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.Toast;

import com.obst.story.R;

public class WriteActivity extends ActionBarActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.write_layout);
	}
	@Override
	public boolean onCreateOptionsMenu (Menu menu) {
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.menu.write, menu);

		return true;
	}
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        switch (item.getItemId()) {
        case R.id.save_button : 
        	/*						
			intent = new Intent(TraceActivity.this,
					LoginActivity.class);**/
        	Intent intent = new Intent(WriteActivity.this, WriteActivity.class);
        	startActivity(intent);
        	Toast.makeText(this, "saved", Toast.LENGTH_SHORT).show();
            break;            
        }
        return super.onOptionsItemSelected(item);
    }
}
